using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Rensoft.Server.Security;
using System.Text.RegularExpressions;

public static class Settings
{
    public static string ServerName = ConfigurationManager.AppSettings["ServerName"];
    public static string[] IPAddresses = ConfigurationManager.AppSettings["IPAddresses"].Split(',');

    public static class ConnectionStrings
    {
        public static string HostingDatabase =
            ConfigurationManager.ConnectionStrings["HostingDatabase"].ConnectionString;
    }

    public static class Client
    {
        public const WindowsUserFlag DefaultUserFlags =
            WindowsUserFlag.NormalAccount |
            WindowsUserFlag.PasswordCannotChange |
            WindowsUserFlag.PasswordNeverExpires;

        public const string AnonymousUserPrefix = "IUSR_";
        public const string WorkerProcessUserPrefix = "IWAM_";
        public const string AnonymousUserFullName = "Internet Guest Account";
        public const string WorkerProcessUserFullName = "Launch IIS Process Account";
        public const string SystemUserDescriptionFormat = "Client system user account for {0}";

        public const string AnonymousUserDescription = 
            "Built-in account for anonymous access to Internet Information Services";

        public const string WorkerProcessUserDescription = 
            "Built-in account for Internet Information Services to start out of process applications";

        public static string WebsitesDirectory = ConfigurationManager.AppSettings["WebsitesDirectory"];
    }

    public static class IIS
    {
        public const string ApplicationPoolNameFormat = "{0}AppPool";
        public const string VirtualServerDescriptionFormat = "{0} - {1}";
    }

    public static class DNS
    {
        public static int DefaultTTL = int.Parse(ConfigurationManager.AppSettings["DnsDefaultTTL"]);
        public static string MailHost = ConfigurationManager.AppSettings["DnsMailHost"];
        public static string WebmailHost = ConfigurationManager.AppSettings["DnsWebmailHost"];
        public static string[] MailExchanges = ConfigurationManager.AppSettings["MailExchanges"].Split(',');
        public static string[] NameServers = ConfigurationManager.AppSettings["NameServers"].Split(',');
        public static string PrimaryServer = ConfigurationManager.AppSettings["PrimaryServer"];
        public static string ResponsibleParty = ConfigurationManager.AppSettings["ResponsibleParty"];
    }
}